{% extends "base.html" %}
{% block title %} 链接推荐{% endblock %}
{% block content %}


<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" charset="utf-8"> </script>
<script language="javascript">
/*
$.ajax({url: 'stat.php',
type: 'POST',
data:{Name:"keyun"},
dataType: 'html',
timeout: 1000,
error: function(){alert('Error loading PHP document');},
success: function(result){alert(result);}
});
*/
	$(document).ready(function(){
        $("#submit").click(function(){
            alert(1);
			var name = $("#name").attr("value");
			var url  = $("#url").attr("value");
            $.post("/share/",{"name":name,"url":url},function(data){alert("thanks for you share :D");});
/*			$.ajax({
				url:"/share/",
				type:"post",
                cache:false,
				data:{"name":name,"url":url},
				success:function(dd){alert('Thanks for your Share :)');},
			});   */
		});
    });
</script>
<p>网站名称 <input type="text" id="name"></p>
<p>链接地址 <input type="text" id="url"></p>
<p><button id="submit">提交</button></p>

{% endblock%}
